<%--
  Created by IntelliJ IDEA.
  User: adelaide
  Date: 2021/10/25
  Time: 22:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>编辑商品</title>
    <link type="text/css" rel="stylesheet" href="fontsawesome/css/font-awesome.css"/>
    <link type="text/css" rel="stylesheet" href="css/style.css"/>
</head>
<body>
<div class="main_box">
    <div class="cont_box editpro_box">
        <form action="${pageContext.request.contextPath}/updateProduct" method="post" id="editPro_form">
            <ul class="addpro_box">
                <li>
                    <label></label>
                    <input type="hidden" name="pid" value="${product.pid}" />
                </li>
                <li>
                    <label>商品名称：</label>
                    <input type="text" placeholder="请输入商品名称" name="pname" value="${product.pname}" required data-rule-proname="true" data-msg-required="商品编码不能为空"/>
                </li>
                <li>
                    <label>售价：</label>
                    <input type="text" placeholder="请输入商品售价" name="price" value="${product.price}" required data-rule-pricein="true" data-msg-required="商品售价不能为空"/>
                </li>
                <li>
                    <label>销售提成：</label>
                    <input type="text" placeholder="请输入销售提成" id="sale" name="sales" value="${product.sales}" required data-rule-pricein="true" data-msg-required="销售提成不能为空"/>
                </li>
                <li>
                    <label>库存：</label>
                    <input type="text" placeholder="请输入商品库存" name="stock" value="${product.stock}" required data-rule-digits="true" data-msg-required="商品库存不能为空，无库存请填“0”" data-msg-digits="请输入正整数"/>
                </li>
                <li>
                    <label>状态：</label>
                    <select name="pstate">
                        <option value="0">下架</option>
                        <option value="1">上架</option>
                        </select>
                </li>
                <li>
                    <label>所属分类：</label>
                    <select name="cid" required data-msg-required="所属分类不能为空">
                        <c:forEach items="${cateGory}" var="cateGory">
                            <option value="${cateGory.cid}">${cateGory.cname}</option>
                        </c:forEach>
                        </select>
                </li>
                <li>
                    <label>商品描述：</label>
                    <textarea rows="3" name="remark" >${product.remark}</textarea>
                </li>
            </ul>
            <div class="probtn_box clearfix">
                <input type="submit" value="保存修改" class="btn blue_btn submit"/>
            </div>
        </form>
    </div>
</div>
<!--javascript include-->
<script src="js/jquery-2.2.1.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/bootstrap-datepicker.js"></script>
<script src="js/jquery.validate.min.js"></script>
<script src="js/jquery.form.min.js"></script>
<script src="js/other.js"></script>
<%--<script>--%>
<%--    $(function(){--%>
<%--        $("body").other({formId:"#editPro_form",formUrl:"#"});//formUrl 表单请求地址--%>
<%--    });--%>
<%--</script>--%>
</body>
</html>
